package com.fdb.smcts.core.exception;

import com.fdb.smcts.core.constant.FlowExceptionType;

/**
 * 
 * 流程异常
 * 
 * @author Cytus_
 * @since 2018年5月7日 下午2:08:31
 * @version 1.0
 *
 */
public class FlowException extends ApplicationException {

	private static final long serialVersionUID = 1L;

	public static final String MESSAGE = "流程异常";
	
	private FlowExceptionType flowExceptionType;
	
	public FlowException(String message) {
		super(message);
		this.flowExceptionType = FlowExceptionType.DEFAULT;
	}
	
	public FlowException(String code, String message) {
		super(code, message);
		this.flowExceptionType = FlowExceptionType.DEFAULT;
	}

	public FlowException(FlowExceptionType type, String message) {
		super(message);
		this.flowExceptionType = type;
	}
	
	public FlowException(FlowExceptionType type, String code, String message) {
		super(code, message);
		this.flowExceptionType = type;
	}
	
	public FlowException(String message, Throwable cause) {
		super(message, cause);
		this.flowExceptionType = FlowExceptionType.DEFAULT;
	}

	public FlowException(FlowExceptionType type, String message, Throwable cause) {
		super(message, cause);
		this.flowExceptionType = type;
	}
	
	public FlowException(String code, String message, Throwable cause) {
		super(code, message, cause);
		this.flowExceptionType = FlowExceptionType.DEFAULT;
	}
	
	public FlowException(FlowExceptionType type, String code, String message, Throwable cause) {
		super(code, message, cause);
		this.flowExceptionType = type;
	}
	
	public FlowExceptionType getFlowExceptionType() {
		return flowExceptionType;
	}

	public String getFlowExceptionTypeStr() {
		return flowExceptionType.toString();
	}
}
